package com.ftg.learn.framework.mybatis.chapter03.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author 布衣
 */
public interface TeacherMapper {

    /**
     * 查找 帐号是否存在
     * @param account
     */
    @Select("select count(tno) from teacher where tno = #{account}")
    int selectOneByAccount(@Param("account") String account);

    @Select("select tno from teacher where tno = #{account} and tname = #{tname}")
    String selectOneByAccountAndPassword(String account);
}
